package com.hospital.tools;

import android.widget.Toast;

public class MessageChecker {
	public String checkLoginMes(String name, String password)
	{
		String mes = "";
		if(name.equals(""))
			mes = "用户名为空";
		else if(password.equals(""))
			mes = "密码为空";

		return mes;

	}
	public String checkRegisterMes(String regna, String regpa,String regpa1, String regid, String regmednum, String regpho,String regtrena, String regadr)
	{
		String mes = "";
		if(regna.equals(""))
			mes = "用户名为空";
		else if(regpa.equals(""))
			mes = "密码为空";
			//else if(!regpa.equals(regpa1))
			//	mes = "密码二次输入不一致";
		else if(regtrena.equals(""))
			mes = "姓名为空";
		else if(regid.equals(""))
			mes = "身份证号码为空";
		else if(regid.length() != 18)
			mes = "身份证号码应为18位";
		else if(regmednum.equals(""))
			mes = "就诊号为空";
		else if(regmednum.length() != 6)
			mes = "就诊号应为6位";
		else if(regpho.equals(""))
			mes = "手机号为空";
		else if(regpho.length() != 11)
			mes = "手机号应为11位";
		return mes;

	}
	public String checkRegisterActMes(String name, String password,String veco)
	{
		String mes = "";
		if(name.equals(""))
			mes = "用户名为空";
		else if(password.equals(""))
			mes = "密码为空";
		else if(veco.equals(""))
			mes = "验证码为空";

		return mes;

	}
	public String checkRegisterActMes(String name, String password)
	{
		String mes = "";
		if(name.equals(""))
			mes = "用户名为空";
		else if(password.equals(""))
			mes = "密码为空";

		return mes;

	}
	public String checkChangePassword( String password, String newpassword, String newpasswordtoo)
	{
		String mes = "";

		if(password.equals(""))
			mes = "旧密码为空";
		else if(newpassword.equals(""))
			mes = "新密码为空";
		else if(newpasswordtoo.equals(""))
			mes = "再输新密码为空";
		else if(!newpassword.equals(newpasswordtoo))
			mes = "新密码再次输入不一致，请重输";
		return mes;

	}
	public String checkFindPassword(String name, String phone)
	{
		String mes = "";
		if(name.equals(""))
			mes = "用户名为空";
		else if(phone.equals(""))
			mes = "手机号为空";
		return mes;

	}

}
